
	.section .rodata

	.section .bss
	 .comm x_,4,4
	 .comm y_,4,4

	.section .text

	.globl soma
	.type soma,@function

soma: 
	pushl %ebp
	movl (%esp),%ebp
	movl $2,%eax
	movl %eax,12(%ebp)
	movl $3,%eax
	movl %eax,8(%ebp)
	movl 12(%ebp),%eax
	pushl %eax
	movl 8(%ebp),%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,-4(%ebp)
	movl %ebp,(%esp)
	popl %ebp
	ret

	.globl somaDois
	.type somaDois,@function

somaDois: 
	pushl %ebp
	movl (%esp),%ebp
	movl 12(%ebp),%eax
	pushl %eax
	movl 8(%ebp),%eax
	addl	%eax,(%esp)
	popl	%eax
	jmp somaDois.conclusion
somaDois.conclusion:
	movl %ebp,(%esp)
	popl %ebp
	ret

	.globl main
	.type main,@function

main: 
	pushl %ebp
	movl (%esp),%ebp
	movl $3,%eax
	movl %eax,x_
.L1:
	movl x_,%eax
	pushl %eax
	movl $8,%eax
	cmpl	%eax,(%esp)
	jge	.L2
	movl x_,%eax
	pushl %eax
	movl $5,%eax
	cmpl	%eax,(%esp)
	jne .L3
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
	jmp .L4
.L3:
	movl x_,%eax
	pushl %eax
	movl $2,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
.L4:
	jmp .L1
.L2:
.L5:
	movl x_,%eax
	pushl %eax
	movl $20,%eax
	cmpl	%eax,(%esp)
	jge	.L6
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
	movl x_,%eax
	pushl %eax
	movl $3,%eax
	cltd
	idivl	(%esp)
	movl	%edx, %eax
	popl	%eax
	pushl %eax
	movl $0,%eax
	cmpl	%eax,(%esp)
	jne .L7
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	subl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
.L7:
	movl x_,%eax
	pushl %eax
	movl $2,%eax
	cltd
	idivl	(%esp)
	movl	%edx, %eax
	popl	%eax
	pushl %eax
	movl $0,%eax
	cmpl	%eax,(%esp)
	jne .L8
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
	jmp .L9
.L8:
	movl x_,%eax
	pushl %eax
	movl $3,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
.L9:
	jmp .L10
.L6:
	movl x_,%eax
	pushl %eax
	movl $2,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
.L10:
	movl x_,%eax
	pushl %eax
	movl $25,%eax
	cmpl	%eax,(%esp)
	jg	.L5

#end program (exit)
	movl $1,%eax
	movl $0,%ebx
	int $0x80
